package com.example.superoa.common;

import java.util.Properties;
//import org.springframework.mail.SimpleMailMessage;
//import org.springframework.mail.javamail.JavaMailSenderImpl;

public class Mail {
	public void fasong(String to,String str) {
//		JavaMailSenderImpl senderImpl = new JavaMailSenderImpl();
//        // 设定mail server 5 
//		senderImpl.setHost("smtp.qq.com");
//        // 根据自己的情况,设置username
//        senderImpl.setUsername("2911775457@qq.com");
//        senderImpl.setPassword("qxmuxubeqksedgdj"); // 根据自己的情况, 设置password，注意qq邮箱的话此处设置16位授权码，不是邮箱密码，切记！
//        //senderlmpl.setp
//        //加认证机制
//        Properties javaMailProperties = new Properties();
//        javaMailProperties.put("mail.smtp.auth", true);
//        javaMailProperties.put("mail.smtp.starttls.enable", true);
//        javaMailProperties.put("mail.smtp.timeout", 5000);
//        senderImpl.setJavaMailProperties(javaMailProperties);
//
//        // 建立邮件消息
//        SimpleMailMessage mailMessage = new SimpleMailMessage();
//        mailMessage.setTo(to);
//        mailMessage.setFrom("2911775457@qq.com");
//        mailMessage.setSubject("面试通知");
//        mailMessage.setText(str);
//
//        // 发送邮件
//        senderImpl.send(mailMessage);
	}
}